cc.Class({
    extends: cc.Component,

    properties: {
        labelNum:cc.Label,
        selFrame:cc.Label,
        layerCom:cc.Node,
    },
    
    onLoad: function()
    {
        this.set_SelFrame(false);
    },

    // use this for initialization
    itemDataAssignment(obj,tableviewUtils){
        this.data = obj;
        this.Refresh_view();
    },

    Refresh_view:function()
    {
        var itemData = this.data.itemData;
        this.labelNum.string= itemData.labelNum;
        this.set_SelFrame(itemData.isSel);
    },

    set_SelFrame:function(isSel)
    {
        this.selFrame.node.active = isSel;
    },

    onClickItem:function()
    {
        var _layerCom = this.layerCom.getComponent(cc.Component);
        var _data = this.data;
        if(_layerCom && _data)
        {
            _layerCom.onClickItem(_data.index);
        }
    },
});
